<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="true"%>
<jsp:directive.page import="DAO.TrainManageDAO" />
<jsp:directive.page import="entity.Train" />
<jsp:directive.page import="java.util.List" />
<%
	String action = request.getParameter("action");
	String id = request.getParameter("id");
	if (id == null || id == "") {
		out.println("没有选中查看的车次");
		return;
	}
	if ("edit".equals(action)) {
		Train train = TrainManageDAO.find(id);
		request.setAttribute("train", train);
	}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<jsp:include page="./head/head.jsp"></jsp:include> 
<style type="text/css">
#update_button{
	font-size:18px;
	font-weight:bold;
	width:100%;
	height:25px;
	color: #f00;
}
</style>
<script type="text/javascript">
function warn(){
	alert("车次信息不可修改");
}
</script>
<body>
	<div align="center">
		<div class="header">
			<jsp:include page="./head/header.jsp"></jsp:include>
		</div>
		<div class="content">
			<table border="0" width="1024" cellpadding="0" cellspacing="0">
				<tr>
					<td width="130" bgcolor="#dfeaf1" valign="top">
						<div class="nav">
							<jsp:include page="./navigation/navigation.jsp"></jsp:include>
						</div>
					</td>
					<td>
						<table width="100%" height="350" border="1" cellpadding="0"
							cellspacing="0" bgcolor="#dfeaf1">
							<tr>
								<TD align="center" valign="top"
									style="padding-left: 20px; padding-top: 10px;">
									<div align="left">
										当前位置: <a href="homepage.jsp">首页</a> > <a
											href="trainManage.jsp">车次信息管理</a> > 修改
									</div> <br /><br />
								<label id="msg" style="color:red;font-size:12pt;"></label>
								<form action="../UpdateTrainAction" method="post">
									<table border="2" bordercolor="#12A0F5" width="50%"
										height="80%">
										<tr>
											<td>火车车次:</td>
											<td><input type="text" id="trainid" name="trainid" onclick="warn()" readonly
												style='font-size: 18px' width=200 value=${train.trainid } /></td>
										</tr>
										<tr>
											<td>出发地:</td>
											<td><input type="text" id="start" name="start" 
												style='font-size: 18px' width=200 value=${train.start } /></td>
										</tr>
										<tr>
											<td>到达地:</td>
											<td><input type="text" id="end" name="end" 
												style='font-size: 18px' value=${train.end } /></td>
										</tr>
										<tr>
											<td>行车时间:</td>
											<td><input type="text" id="time" name="time" 
												style='font-size: 18px' value=${train.time } /></td>
										</tr>
										<tr>
											<td>硬座票价:</td>
											<td><input type="text" id="yzprice" name="yzprice" 
												style='font-size: 18px' value=${train.yzprice } /></td>
										</tr>
										<tr>
											<td>软座票价:</td>
											<td><input type="text" id="rzprice" name="rzprice" 
												style='font-size: 18px' value=${train.rzprice } /></td>
										</tr>
										<tr>
											<td>硬卧票价:</td>
											<td><input type="text" id="ywprice" name="ywprice" 
												style='font-size: 18px' value=${train.ywprice } /></td>
										</tr>
										<tr>
											<td>软卧票价:</td>
											<td><input type="text" id="rwprice" name="rwprice" 
												style='font-size: 18px' value=${train.rwprice } /></td>
										</tr>
										<tr>
											<td>车辆路线:</td>
											<td><textarea id="root" name="root" rows="5" 
													style="width: 300px; font-size: 18px">${train.root }</textarea></td>
										</tr>
										<tr>
												<td colspan=2 align=center>
												<!--按钮填充单元格  -->
												<input type="submit" id="update_button"
													name="Submit" value="提交"/></td>
										</tr>
									</table>
								</form> 
								<br />
								<br />
								</TD>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td height="20"></td>
				</tr>
			</table>
		</div>

		<div class="footer">
			<!-- 底部版权所有界面 -->
			<jsp:include page="./footer/footer.jsp"/> 
		</div>
	</div>
</body>
</html>
